/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Map;
import java.util.TreeMap;

/**
 * <p>Project: javaseapp - TreeMap1
 * <p>Powered by webrx On 2021-08-12 11:41:21
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class TreeMap4 {
    public static void main(String[] args) {
        Map<Integer, String> m = new TreeMap<>((a, b) -> b - a);
        m.put(1, "java1");
        m.put(3, "java122");
        m.put(10, "java2");
        m.put(4, "java4");

        System.out.println(m.size());
        System.out.println(m);
    }
}
